using System;
using Caliburn.Micro;

namespace MediaOwl.Common.Busy
{
    public interface IBusy : IScreen
    {
        Exception BusyError { get; set; }
        
        bool HasCancel { get; }
        bool IsIndeterminate { get; }
        double Percentage { get; }

        void WithTargetValue(double targetValue);
        void WithData(string title, string message = null, bool withCancel = false);
        void UpdatePercentage(double currentValue);
        void Cancel();

        event EventHandler<EventArgs> Canceled;
    }
}